package com.zjmy;

import com.lgCore.clientInvok.RpcFactory;
import com.lgCore.clientInvok.RpcScannerConfigurer;
import com.lgCore.util.PropertyValues;
import org.omg.CORBA.Environment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.beans.factory.annotation.Value;

@Configuration
@EnableScheduling
@SpringBootApplication()
//@EnableSwagger2
public class RpcClientApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(RpcClientApplication.class, args);
    }

    /*****************启动RPC客户端 start********************/
    /**
     * 客户端RPC调用工厂
     * @return
     */
    @Bean
    public RpcFactory getRpcFactory(){
        return new RpcFactory();
    }

    /**
     * 接口service 注入到spring
     * @return
     */
    @Bean
    public RpcScannerConfigurer getRpcScannerConfigurer(){
        return new RpcScannerConfigurer("com.zjmy");
    }
    /*****************启动RPC客户端 end********************/
}
